//
//  MyCreatApprovalViewController.m
//  lsOA
//
//  Created by 蓝水软件 on 2016/11/22.
//  Copyright © 2016年 苏州蓝水有限公司. All rights reserved.
//

#import "MyCreatApprovalViewController.h"

@interface MyCreatApprovalViewController ()

@end

@implementation MyCreatApprovalViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//刷新执行事件 其实他应该算重新加载数据
-(void)sunnyControlDidStartAnimation{
    NSDictionary *dic = @{@"conditions":@"",@"starTime":@"",@"endTime":@"",@"verify":@"2"};
    [self getData:dic];
}
/**
 *  获取表格数据
 */
- (void)getData:(NSDictionary *)dic{
    self.model = [[FileListModel alloc]init];
    [GMDCircleLoader setOnView:self.view withTitle:@"" animated:YES];
    [self.model getData:self.fromView listType:self.listType screenDic:dic];
    __block MyCreatApprovalViewController *blockSelf = self;
    self.model.block = ^(BOOL success){
        if (success) {
            [blockSelf.table reloadData];
            [blockSelf setValue];
            [blockSelf hidenButton:YES];
        }else{
            [blockSelf.screenButton setHidden:YES];
            [blockSelf hidenButton:NO];
        }
        [blockSelf endAnimationHandle];
        [GMDCircleLoader hideFromView:blockSelf.view animated:YES];
    };
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
